import request from '@/util/request'

// 获取 【】 的所有 【镇（苏木）】
export function getTownList(countyId) {
  return request({
      url: `/hxyc/api/cattle/townList?countyId=${countyId}`,
      method: 'get'
  })
}

// 获取 【 - 某一个乡镇】 的所有 【嘎查】 
export function getVillageList(townId) {
  return request({
      url: `/hxyc/api/cattle/villageList?townId=${townId}`,
      method: 'get'
  })
}

// 获取 xxx镇（苏木）描述文字
export function getTownInfo(townId) {
  return request({
      url: `/hxyc/app/city/city/getTownInfo?townId=${townId}`,
      method: 'get',
  })
}

// 获取 xxx村（嘎查）描述文字
export function getVillageInfo(villageId) {
  return request({
      url: `/hxyc/app/city/city/getVillageInfo?townId=${villageId}`,
      method: 'get',
  })
}

// xxx 镇的 存栏统计
export function getFarmTownCattleCount(params) {
  return request({
      url: `/hxyc/api/bigData/getFarmTownCattleCount?townId=${params.townId}&villageId=${params.villageId || ''}&muhuId=${params.muhuId}&farmId=${params.farmId || ''}`,
      method: 'get'
  })
}

// xxx 镇的 配种统计
export function getFarmTownBreedCount(params) {
  return request({
      url: `/hxyc/api/bigData/getFarmTownBreedCount?townId=${params.townId}&villageId=${params.villageId || ''}&muhuId=${params.muhuId}&farmId=${params.farmId || ''}`,
      method: 'get'
  })
}